﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebAsp.DTO;

namespace WebAsp.DAL
{
    public class ContactDAL
    {
        public static void InsertContact(ContactDTO c)
        {
            LinQDataContext dt = new LinQDataContext();
            CONTACT ct = new CONTACT();
            ct.FullName = c.Name;
            ct.Email = c.Email;
            ct.Tel = c.Tel;
            ct.Address = c.Address;
            ct.Title = c.Title;
            ct.Contents = c.Contents;

            dt.CONTACTs.InsertOnSubmit(ct);
            dt.SubmitChanges();
        }
    }
}